/**

 */

package com.times.util;

import java.util.ArrayList;
import java.util.List;


/**
 * ClassName: JsonResult 
 * @author 
 * @version 2015
 */
public class JsonResult {
    
    private boolean success;

    private Object code;
    
    private String msg;
    
    private List<?> data;

    

    public boolean getSuccess() {
        return success;
    }


    
    
    public void setSuccess(boolean success) {
        this.success = success;
    }



    public Object getCode() {
        return code;
    }

    

    public void setCode(Object code) {
        this.code = code;
    }

    
 
    public String getMsg() {
        return msg;
    }

    

    public void setMsg(String msg) {
        this.msg = msg;
    }

    

    public List<?> getData() {
        return data;
    }


    public void setData(Object data)
    {
        if(data instanceof List){
            this.data = (List<?>) data;
        }else{
            List<Object> list = new ArrayList<Object>();
            list.add(data);
            this.data = list;
        }
    }
}

